#ifndef RENDERABLELINE_H_INCLUDED
#define RENDERABLELINE_H_INCLUDED

//predecl
namespace cvRenderInterface	{ class LineCollection; };

// includes
#include "Renderable.h"
#include "cvIPrimitives.h"

namespace cvRenderInterface
{
	/**
	 * Abstract Line Renderer
	 */
	class RenderableLine : public Renderable
	{
		public:
			/// RenderableLines can be created for singleshot usage or continous draw.
			//static Renderable * create();  <must be defined by derived.>

			// creates instance for CollectionNode to use in singleshot rendering.
			//static Renderable * createSingleshot(); <must be defined by derived.>

			// returns PRIMITIVE_LINE
			virtual const Collection collectionType() const;


			/// Primitive Attribute writers
			virtual void verts(const cvVert &v1, const cvVert &v2) =0;
			virtual void color(const RGBAf &col) =0;
			virtual void colorv1(const RGBAf &col) =0;
			virtual void colorv2(const RGBAf &col) =0;
			//TODO: attribute readers.

		protected:
			RenderableLine();
			~RenderableLine();

			// this primitive type's collection target. requestCollection()
			// tests this Collection node first if it is suitable allocation target.
			// if not, it's updated to new one.
			static CollectionNode * m_collection_alloctarget;
	};
};
#endif // RENDERABLELINE_H_INCLUDED
